package net.dgg.rz.production.dao;


import net.dgg.rz.production.entity.ProductNodeOperating;
import net.dgg.rz.production.entity.ProductTimeStatus;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public interface ProductNodeOperatingDao {
    int deleteByPrimaryKey(Long id);

    int insert(ProductNodeOperating record);

    int insertSelective(ProductNodeOperating record);

    ProductNodeOperating selectByPrimaryKey(Long id);

    ProductNodeOperating selectJDByScOrderIdAndNodeId(Map map);

    ProductNodeOperating selectByScOrderIdAndNodeId(Map map);

    int updateByPrimaryKeySelective(ProductNodeOperating record);

    int updateByPrimaryKey(ProductNodeOperating record);


    /**
    * <p>@Description 详情页历史记录中的生产节点记录数据</p>
    * <p>@author mqy</p>
    * <p>@Time 2018/8/23 0023 15:14 创建时间</p>
    * <p>@return</p>
    */
    List<ProductNodeOperating> queryProductOperatingWithPage(Map map);

    /**
     * <p>@Description 统计完结相关</p>
     * <p>@author mqy</p>
     * <p>@Time 2018/9/6 0006 9:48 创建时间</p>
     * <p>@return</p>
     */
    Integer productOperatingCount(Map map);


    /**
     * 接收插入节点更新信息
     * @param nodeOperating
     * @return
     */
    int insertProductNodeOperating(ProductNodeOperating nodeOperating);

    List<ProductNodeOperating> queryPorductNodeOperatingByScProductId(Long productId);

    List<ProductNodeOperating> selectByScProId(@Param("scOrderId") Long scOrderId);

    List<ProductNodeOperating> selectByNodeId(@Param("params") Map params);

    Integer selectByNodeIdCount(@Param("params")Map params);

    /**
     * 根据生产单id查询生产单的办理团队
     * @param scOrderId
     * @return
     */
	List<Map> getScOrderManagementTeam(@Param("scOrderId")String scOrderId);

}